home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-12-22 | 1.2 KB | 65 lines | [TEXT/CWIE] |
- // CCMArea version 1.3
- // 11-11-97
- // by David Catmull
-
- /* History:
-
- 9-19-97 First version
-
- 10-6-97 Added sCloseStringID and SetCloseStringID
-
- 10-16-97 Checks status if cmd_Close instead of goAwayFlag
-
- 10-20-97 Got rid of Click and AdjustCursorSelf
-
- 10-22-97 Added check for winAttr_regular
-
- 11-11-97 Moved sCloseStringID to UCMArea::sCmdStringID
-
- 12-18-97 Updated to use UCMArea::AppendMenuCommand
-
- 12-22-97 Added GetSelectionDesc
- */
-
- #include "CCMWindow.h"
- #include "UCMArea.h"
- #include <Appearance.h>
-
- CCMWindow::CCMWindow(LStream *inStream)
- : LWindow(inStream)
- {
- }
-
- void
- CCMWindow::ClickSelf(const SMouseDownEvent &inMouseDown)
- {
- CMClick(inMouseDown);
- }
-
- void
- CCMWindow::BuildMenuSelf(MenuHandle inMenu)
- {
- if (HasAttribute(windAttr_Regular)) {
- Boolean enabled,usesMark;
- Char16 mark;
- Str255 name;
-
- LCommander::GetTarget()->ProcessCommandStatus(cmd_Close,enabled,usesMark,mark,name);
-
- if (enabled) {
- Str255 closeString;
-
- ::GetIndString(closeString,UCMArea::GetCmdStringID(),1);
- UCMArea::AppendMenuCommand(inMenu,closeString,cmd_Close);
- }
- }
- }
-
- void
- CCMWindow::GetSelectionDesc(AEDesc &outSelDesc)
- {
- AEDesc nullDesc = { 0,0L };
-
- MakeSelfSpecifier(nullDesc,outSelDesc);
- }
-